<?php
use think\facade\Route;

// 需要定义的路由的功能 index.php: 首页， 板块页面， 发帖表单， 执行发帖，
// 上传头像表单， 执行更新头像， 联系我们

// 不需要定义： check、showSec、checkMId、checkSId


// 定义路由的文件
// Route::rule('/forumSec','index/view','get');
Route::rule('/:sid/forumSec','index/view','get');
// 必选参数
// Route::get('/:sid/forumSec','index/view');
// Route::get('/<sid>/forumSec','index/view');

// 版本一静态规则+动态规则

// 首页的路由(静态)
Route::rule('/O/forum$','index/index');
Route::rule('/forum_upPic$','index/me');
Route::rule('/forum_upMe$','index/upMe');


// 可选参数(动态)

// Route::get('/forumSec/[:sid]','index/view');

Route::get('/forumSec/<sid?>$','index/view');
// Route::get('/forumSec/post/:sid$','index/post');
Route::get('/forumPost/:sid$','index/post');
Route::get('/forumDetail/:mid$','index/detail');
Route::get('/forumResponse/<rcontent?><mid?>$','index/response');
Route::get('/forumDopost/<mtitle?><mcontent?>$','index/dopost');

// 需要定义路由的功能: User.php 登录表单,登录验证，注册表单，注册验证，注销
Route::rule('/forumcTact$','user/contact');
Route::rule('/forumLogout$','user/logout');
Route::rule('/forumLogin$','user/login');
Route::rule('/forumreg$','user/reg');
Route::rule('/forumdoreg$','user/doreg');
// 动态
Route::rule('/forumDologin/<userid?><password?>','user/dologin');


// miss路由(需要在强制路由模式下使用)
Route::miss('public/miss');